package com.jihad.sbd.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import com.jihad.sbd.common.convert.PagerConverter;
/**
 * 将转换器注册到spring
 * @author wukai
 *
 */
@Configuration
public class ConvertConfig extends WebMvcConfigurerAdapter {
	@Override
	public void addFormatters(FormatterRegistry registry) {
		//如果不注册，则无法完成pager参数自动绑定
		registry.addConverter(new PagerConverter());
	}
}
